package org.itheimma.springbootquickstart.mapepr;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.itheimma.springbootquickstart.pojo.Users;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper extends BaseMapper<Users> {
    //BaseMapper自带的selectAllUsers报错。。。
    @Select("SELECT * FROM Users")
    List<Users> selectAllUsers();

    @Select("select Three_id from models order by uploaded_timestamp desc limit 1")
    int findThreeId();
    @Select("select image_id from Images order by upload_timestamp desc limit 1")
    int findImgId();
}